import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css' // 引入样式
import axios from 'axios'

const pinia = createPinia()
const app = createApp(App)
// 设置全局axios实例（可选）
app.config.globalProperties.$axios = axios
// 示例：设置默认baseURL（根据你的后端API地址修改）
axios.defaults.baseURL = 'http://localhost:9520'
app.use(router)
app.use(pinia)
pinia.use(piniaPluginPersistedstate)
app.use(ElementPlus,{
    locale: zhCn
})
app.mount('#app')